Skip to main content
GET
/
v1
/
axons
/
{id}
/
subscribe
/
sse
JavaScript
import Runloop from '@runloop/api-client';

const client = new Runloop({
  bearerToken: process.env['RUNLOOP_API_KEY'], // This is the default and can be omitted
});

const axonEventView = await client.axons.subscribeSse('id');

console.log(axonEventView.axon_id);
{
  "sequence": 123,
  "axon_id": "<string>",
  "timestamp_ms": 123,
  "origin": "EXTERNAL_EVENT",
  "source": "<string>",
  "event_type": "<string>",
  "payload": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

The axon identifier.

Response

200 - application/json

OK

sequence
integer<int64>
required

Monotonic sequence number.

axon_id
string
required

The axon identifier.

timestamp_ms
integer<int64>
required

Timestamp in milliseconds since epoch.

origin
enum<string>
required

Event origin.

Available options:
EXTERNAL_EVENT,
AGENT_EVENT,
USER_EVENT,
SYSTEM_EVENT
source
string
required

Event source (e.g. github, slack).

event_type
string
required

Event type (e.g. push, pull_request).

payload
string
required

JSON-encoded event payload.